﻿@model PagedList.IPagedList<MvcAtletIS.Models.Articles>
@{
    ViewBag.Title = "Videogaléria";
}

<h2>Videogaléria</h2>

<div class="paging-box">
    
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "VideoGallery", new { page = 1  })
        @Html.Raw(" ");
        @Html.ActionLink("<", "VideoGallery", new { page = Model.PageNumber - 1 })
    }

    Strana @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) z @Model.PageCount
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink(">", "VideoGallery", new { page = Model.PageNumber + 1 })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "VideoGallery", new { page = Model.PageCount })
    }
        
</div>

    @foreach (var item in Model)
    { 
        <div class="video-box">
            <iframe style="width:100%; height:300px; border:0;" src="http://@item.Perex"></iframe>
            <p>@item.Title</p>
        </div>
    }

<div class="paging-box">
    
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "VideoGallery", new { page = 1 })
        @Html.Raw(" ");
        @Html.ActionLink("<", "VideoGallery", new { page = Model.PageNumber - 1 })
    }

    Strana @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) z @Model.PageCount
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink(">", "VideoGallery", new { page = Model.PageNumber + 1 })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "VideoGallery", new { page = Model.PageCount })
    }
        
</div>
